home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 43
/
Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso
/
-in_the_mag-
/
workbench
/
sql
/
sqldb
/
rexxmacros
/
sqltest5.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1999-06-29
|
684b
|
30 lines
/* sqltest5.rexx */
address 'SQLserver'
options results
'ExecSQL' 'open table salesreps;'
'ExecSQL' "declare testcur cursor for select from salesreps where empl_num < 106;"
'ExecSQL' 'open testcur;'
'ExecSQL' 'fetch columns of testcur;'
/*trace(results)*/
say 'result = ' result
'GetLastCode'
say 'sqlcode = ' result
do forever
/* if result > 0
then say 'greater than zero'
if result = 0
then say 'equal to zero'
if result < 0
then say 'less than zero'
*/
if result ~= 0
then break
'ExecSQL' 'fetch next of testcur;'
say 'result = ' result
'GetLastCode'
say 'sqlca.sqlcode = ' result
end
'ExecSQL' 'close testcur;'
'ExecSQL' 'close table salesreps;'